<?php $this->start('content1');
$this->layout = 'notweetbox';?>
<head>
<script type="text/javascript">
function displayResult()
{
var phpLogin = document.getElementById("Tweet11Text").value ;
var num = phpLogin.length;
var num2 = 140;
var num3 = num2 - num;
document.getElementById("x").innerHTML = num3;
if(num3 < 0){
document.getElementById("d").disabled = true;
}
else{
document.getElementById("d").disabled = false;
}
}
</script>
</head>
<br />

<h1>Direct Message</h1>

<p id="demo" >


	<?php
echo $this->Form->create();
echo $this->Form->textarea('Text',array("cols"=>5,"id"=>"Tweet11Text","onkeydown"=>"displayResult()","onkeyup"=>"displayResult()","onkeyup"=>"displayResult()","onselect"=>"displayResult()","onload"=>"displayResult()","onchange"=>"displayResult()","onmouseover"=>"displayResult()"));
?>
<table>
<tr>
<td>
<p><button id = "d" value = "Finish" type="submit" onmouseover="displayResult()">Send direct message</button></p>
</td>
<td>
<h2 id="x" ALIGN=RIGHT></h2>
</td>
<table>
</p>
<p>
<?php $this->end();?>


